% Written by Dr R�mi Neveu. Any request to remi.neveu@isc.cnrs.fr. Any use must cite the article these analyses refer to

% Linear mixed model for the two bars on the left of figure 2A
load('Full path to where this file is stored\AnalyseMixedModelCoAuthorsOnlyAllJournals.mat');
VecValueTemp4=table(VecFigure(:,1),VecValueTemp,VecFigure(:,2),'VariableNames',{'Articles','CategoryAuthor','Editor'}); % CategoryAuthor=E for editor's co authors and O for the other authors
ValueResultsModel1=fitlme(VecValueTemp4,'Articles~CategoryAuthor+(1|Editor)','FitMethod','REML');
% Linear mixed model showing that the difference in the two bars on the right of figure 2A are associated with the editor's exepreince in academic research (access to the data for running this model is restricted)
VecValueTemp4=table(VecFigure(:,1),VecFigure(:,3),VecFigure(:,4),VecValueTemp,VecFigure(:,2),'VariableNames',{'Articles','NArticles','ResearchExp','CategoryAuthor','Editor'}); % CategoryAuthor=E for editor's co authors and O for the other authors
ValueResultsModel2=fitlme(VecValueTemp4,'Articles~CategoryAuthor*NArticles+CategoryAuthor*ResearchExp+(1|Editor)','FitMethod','REML');

% Linear mixed model for the two bars on the right of figure 2A
load('Full path to where this file is stored\AnalyseMixedModelCoAuthorsEditorJournal.mat');
VecValueTemp4=table(VecFigure(:,1),VecValueTemp,VecFigure(:,2),'VariableNames',{'Articles','CategoryAuthor','Editor'}); % CategoryAuthor=E for editor's co authors and O for the other authors
ValueResultsModel3=fitlme(VecValueTemp4,'Articles~CategoryAuthor+(1|Editor)','FitMethod','REML');
% Linear mixed model showing that the difference in the two bars on the right of figure 2A are associated with the editor's exepreince in academic research (access to the data for running this model is restricted)
VecValueTemp4=table(VecFigure(:,1),VecFigure(:,3),VecFigure(:,4),VecValueTemp,VecFigure(:,2),'VariableNames',{'Articles','NArticles','ResearchExp','CategoryAuthor','Editor'}); % CategoryAuthor=E for editor's co authors and O for the other authors
ValueResultsModel4=fitlme(VecValueTemp4,'Articles~CategoryAuthor*NArticles+CategoryAuthor*ResearchExp+(1|Editor)','FitMethod','REML');